/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.note.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 笔记增删改查Entity
 * @author liyutg
 * @version 2017-07-26
 */
public class Note extends DataEntity<Note> {
	
	private static final long serialVersionUID = 1L;
	private String noteId;		// note_id
	private String noteType;		// note_type
	private Date noteTimeCreate;		// note_time_create
	private Date noteTimeUpdate;		// note_time_update
	private String noteTitle;		// note_title
	private String noteText;		// note_text
	private String user;		// user_id
	
	public Note() {
		super();
	}

	public Note(String id){
		super(id);
	}

	@Length(min=1, max=10, message="note_id长度必须介于 1 和 10 之间")
	public String getNoteId() {
		return noteId;
	}

	public void setNoteId(String noteId) {
		this.noteId = noteId;
	}
	
	@Length(min=1, max=6, message="note_type长度必须介于 1 和 6 之间")
	public String getNoteType() {
		return noteType;
	}

	public void setNoteType(String noteType) {
		this.noteType = noteType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="note_time_create不能为空")
	public Date getNoteTimeCreate() {
		return noteTimeCreate;
	}

	public void setNoteTimeCreate(Date noteTimeCreate) {
		this.noteTimeCreate = noteTimeCreate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="note_time_update不能为空")
	public Date getNoteTimeUpdate() {
		return noteTimeUpdate;
	}

	public void setNoteTimeUpdate(Date noteTimeUpdate) {
		this.noteTimeUpdate = noteTimeUpdate;
	}
	
	@Length(min=0, max=50, message="note_title长度必须介于 0 和 50 之间")
	public String getNoteTitle() {
		return noteTitle;
	}

	public void setNoteTitle(String noteTitle) {
		this.noteTitle = noteTitle;
	}
	
	@Length(min=0, max=255, message="note_text长度必须介于 0 和 255 之间")
	public String getNoteText() {
		return noteText;
	}

	public void setNoteText(String noteText) {
		this.noteText = noteText;
	}
	
	@Length(min=1, max=10, message="user_id长度必须介于 1 和 10 之间")
	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}
	
}